<?php

App::uses('AppHelper', 'View/Helper');

/**
 * Application helper
 *
 * Add your application-wide methods in the class below, your helpers
 * will inherit them.
 *
 * @package       app.View.Helper
 */
class ImagesHelper extends AppHelper {

    public $helpers = array('Html');

    /**
     * Show images
     */
    public function showSmall($image) {
        return $this->Html->image("/" . str_replace('\\', '/', $image['dir']) . '/thumb/small/' . $image['photo'], array('alt' => $image['photo'], 'class' => 'image-small'));
    }

    public function showSmallGallery($image) {
	$src = "/" . str_replace('\\', '/', $image['dir']) . '/thumb/gallery/' . $image['photo'];
        return $this->Html->image("/" . str_replace('\\', '/', $image['dir']) . '/thumb/small/' . $image['photo'], array('alt' => $image['photo'], 'class' => 'image-small', 'gallery' => $src));
    }


    public function showMedium($image) {
        return $this->Html->image("/" . str_replace('\\', '/', $image['dir']) . '/thumb/medium/' . $image['photo'], array('alt' => $image['photo'], 'class' => 'image-medium'));
    }

    public function showBig($image) {
        return $this->Html->image("/" . str_replace('\\', '/', $image['dir']) . '/thumb/big/' . $image['photo'], array('alt' => $image['photo'], 'class' => 'image-big'));
    }

    public function showSlider($image) {
        return $this->Html->image("/" . str_replace('\\', '/', $image['dir']) . '/thumb/slider/' . $image['photo'], array('alt' => $image['photo'], 'class' => 'image-slider'));
    }

}
